<?php 
namespace Common\Api;

class PluginsMsgApi {
	
	function lists() {
		$map['status'] = 1;
		$list = D('PluginsMsg')->where($map)->select();
		return $list;
	}
	//未读文件
	function CAB_UN_NUM() {
		$map['to_uid'] = session('user_auth.uid');
		$map['readed'] = 0;
		return M('CabinetAccess')->where($map)->count();
	}
	
	//未完成任务
	function CAL_UN_NUM() {
		$map['to_uid'] = session('user_auth.uid');
		$map['process'] = 0;
		return M('CalendarAccess')->where($map)->count();
	}
}